<?php
$data=$HTTP_RAW_POST_DATA;
$nom_file = $_GET["filename"];
$filename = "../patterns/".$nom_file;
$myFile = fopen($filename, "w");  
fputs($myFile, $data);
fclose($myFile);
if ($_GET["overwrite"] == "no")
{
$myFile = fopen("../patterns/list_examples.txt", "a+");  
fputs($myFile, $nom_file.";");
fclose($myFile);
}

?>